package com.huiquan.analysis.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huiquan.analysis.dao.UserDao;
import com.huiquan.analysis.domain.User;
import com.huiquan.framework.base.BaseService;

/**
 * ClassName:Constants
 * Description:
 *
 * @author ChaoKai Wen email:wenchaokai@gmail.com
 * @Date 14/9/22
 * @since Ver 1.0
 */
@Service("userService")
public class UserService extends BaseService {

    @Autowired
    private UserDao userDao;

    public User retrieveUser(String userName, String password) {
        return userDao.retrieveUser(userName, password);
    }

    public List<User> retrieveBelongUsers(Integer userId) {

        return userDao.retrieveBelongUsers(userId);
    }

    public void insertUser(Integer userId, String userName, String password, String realName,
                           Integer parentId, Integer role) {
        userDao.insertUser(userId, userName, password, realName, parentId, role);
    }
}
